package com.example.demo.service;

import org.flowable.engine.runtime.ProcessInstance;

/**
 * @Author: njz
 * @Description:
 * @Date: create in 2022/2/18 17:09
 */
public interface MyProcessInstanceService {
    /**
     * 根据流程定义id启动流程实例
     * @param id
     * @return
     */
    ProcessInstance startProcessInstanceById(String id);

    /**
     * 根据流程定义key启动流程实例
     * @param key
     * @return
     */
    ProcessInstance startProcessInstanceByKey(String key);

    /**
     * 删除运行时的流程实例
     * @param id
     * @param reason
     */
    void deleteProcessInstance(String id,String reason);

}
